/**
    Copyright (C) 2011  Alexander Vollmer

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.jefb.web.controller;

import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.util.GenericForwardComposer;
import org.zkoss.zul.Button;
import org.zkoss.zul.Vbox;

@SuppressWarnings("serial")
public class TestMenuController extends GenericForwardComposer{
	
	protected Button button1;
	protected Button button2;
	
	protected Vbox contentbox;
	
	public void doAfterCompose(Component comp) throws Exception {
		super.doAfterCompose(comp);
	}
	
	public void onClick$button1(Event event){
		contentbox.getChildren().clear();
		Executions.createComponentsDirectly("<include1 />", null, contentbox, null);
	}
	
	public void onClick$button2(Event event){
		contentbox.getChildren().clear();
		Executions.createComponentsDirectly("<include2 />", null, contentbox, null);
	}
}
